device_query
A simple library to query mouse and keyboard inputs on demand without a window. Will work in Windows, Linux on X11, and macOS.
use ;
let device_state = new;
let mouse: MouseState = device_state.get_mouse;
println!;
let keys: = device_state.get_keys;
println!;
Dependencies
Windows and macOS shouldn't require any special software to be installed for
device_query
to work properly. On Linux, the X11 development libraries
are required for device_query
to query state from the OS.
On Ubuntu/Debian:
sudo apt install libx11-dev
On Fedora/RHEL/CentOS:
sudo dnf install xorg-x11-server-devel